
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>登录 - Proxy Gateway</title>
<!-- Tell the browser to be responsive to screen width -->
<meta
 content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
 name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
<!-- Font Awesome
<link rel="stylesheet"
 href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
-->
<!-- Ionicons
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ionicons/ionicons.min.css">
 -->
<!-- <link rel="stylesheet" href="/static/font-awesome/css/font-awesome.min.css"> -->
<!-- Theme style -->
<link rel="stylesheet" href="/static/adminlte/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet"
 href="/static/adminlte/css/skins/_all-skins.min.css">

<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
  <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini">
 <div class="login-box">
  <div class="login-logo">
    <a href="../../index2.html">Proxy Gateway</a>
  </div>
  <!-- /.login-logo -->
  <div class="login-box-body">
      <div class="form-group has-feedback">
        <input name="username" type="text" class="form-control" placeholder="用户名">
        <span class="glyphicon glyphicon-user form-control-feedback"></span>
      </div>
      <div class="form-group has-feedback">
        <input name="password" type="password" class="form-control" placeholder="密码">
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
      </div>
      <div class="form-group">
        <button type="submit" class="btn btn-primary btn-block btn-flat">登录</button>
      </div>
  </div>
  <!-- /.login-box-body -->
</div>

<!-- jQuery 2.2.0 -->
<script src="/static/plugins/jQuery/jQuery-2.2.0.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="/static/bootstrap/js/bootstrap.min.js"></script>
<!-- Slimscroll -->
<script src="/static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="/static/plugins/fastclick/fastclick.js"></script>
<script src="/static/js/main.js"></script>
<script type="text/javascript">
    $(".btn").click(function(){
        api_invoke("/api/v1/login", {username:$("input[name='username']").val(), password:$("input[name='password']").val()}, function(data){
            if(data.errno == 0){
                window.location.href="/";
            }else{
                alert(data.msg);   
            }
        });
    });
</script>
</body>
</html>
